if(object == null) 
throw new SimpleException("no object was unmarshalled from xml");

if (!object.getClass().equals(classe)){
throw new SimpleException(	"parent object from received xml was not of expected class " + type);
}